<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<link href="${path}/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="${path}/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<!-- Data Tables -->
<link href="${path}/css/plugins/dataTables/dataTables.bootstrap.css"
      rel="stylesheet">
<link href="${path}/css/animate.css" rel="stylesheet">
<link href="${path}/css/style.css?v=4.1.0" rel="stylesheet">
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>湖北省武汉市洪山区天气：</h1>
    <table width="800px">
        <tr>
            <td>白天：</td>
            <td>夜间：</td>
            <td>现在：</td>
        </tr>
        <tr>
            <td><img src="" id="dayIcon"></td>
            <td><img src="" id="nightIcon"></td>
            <td><img src="" id="icon"></td>
        </tr>
        <tr>
            <td><span id="dayWeather"></span></td>
            <td><span id="nightWeather"></span>
            </td><td><span id="weather"></span></td>
        </tr>
        <tr>
            <td><span id="dayTemp"></span>℃</td>
            <td><span id="nightTemp"></span>℃</td>
            <td><span id="temp"></span>℃</td>
        </tr>
        <tr>
            <td>风力:<span id="dayWind"></span></td>
            <td>风力:<span id="nightWind"></span></td>
            <td>风力:<span id="wind"></span></td>
        </tr>
        <tr><td></td>
            <td></td>
            <td>湿度:<span id="humidity"></span></td>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td>pm2.5:<span id="pm25"></span></td>
        </tr>
    </table>
</body>
<!-- 全局js -->
<script src="${path}/js/jquery.min.js?v=2.1.4"></script>
<script src="${path}/js/bootstrap.min.js?v=3.3.6"></script>
<script src="${path}/js/plugins/jeditable/jquery.jeditable.js"></script>

<!-- Data Tables -->
<script src="${path}/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="${path}/js/plugins/dataTables/dataTables.bootstrap.js"></script>

<!-- 自定义js -->
<script src="${path}/js/content.js?v=1.0.0"></script>

<!-- layer javascript -->
<script src="${path}/js/plugins/layer/layer.min.js"></script>
<script type="text/javascript">
    getWeather();
    function getWeather(){
        $.ajax({
            url:"/wether/getWeaher",
            data:"code=500237",
            dataType:"json",
            success:function (data){
                $("#dayIcon").attr("src",data.data.dayIcon);
                $("#nightIcon").attr("src",data.data.nightIcon);
                $("#icon").attr("src",data.data.Icon);
                $("#dayWeather").text(data.data.dayWeather);
                $("#nightWeather").text(data.data.nightWeather);
                $("#weather").text(data.data.weather);
                $("#dayTemp").text(data.data.dayTemp);
                $("#temp").text(data.data.temp);
                $("#nightTemp").text(data.data.nightTemp);
                $("#dayWind").text(data.data.dayWind);
                $("#nightWind").text(data.data.nightWind);
                $("#wind").text(data.data.wind);
                $("#humidity").text(data.data.humidity);
                $("#pm25").text(data.data.pm25);
            }
        });
    }
</script>
</html>
